<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="pragma" content="no-store">
    <meta http-equiv="Cache-Control" content="no-cache,no-store">
    <meta http-equiv="expires" content="0">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="wap-font-scale" content="no">
    <style>
        /*QRCode mask-layer*/
        .mask-layer {
            width: 100vw;
            height: 100vh;
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            right: 0;
            z-index: 1000;
        }

        .mask-layer .cover {
            width: 100vw;
            height: 100vh;
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            right: 0;
            z-index: 5;
            background-color: rgba(0,0,0,.5)
        }

        .mask-layer .content {
            width: 100%;
            position: relative;
            z-index: 51;
            font-size: .6rem;
            color: #fff;
            top: 50%;
            text-align: center
        }

        .mask-layer .content .close.icon {
            width: .75rem;
            height: .75rem;
            position: absolute;
            right: 2.25rem;
            top: -1.5rem;
            background: url("") no-repeat center;
            background-size: cover
        }

        .mask-layer .content .qr-code {
            width: 9rem;
            height: 9rem;
            margin: -5.3rem auto 0;
            padding: .75rem;
            background: url("") no-repeat center;
            background-size: cover
        }

        .mask-layer .content .qr-code img {
            width: 100%;
            height: 100%
        }

        .mask-layer .content .slogan {
            padding: .4rem
        }
    </style>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <title>刮刮卡</title>
    <style>
        input {
            -webkit-appearance: none;
        }
    </style>
    <link rel="stylesheet" href="/old/css/modal-px.scss?__inline"/>
    <link rel="stylesheet" href="/old/css/scratch/scratch.scss?__inline" media="screen" title="no_title" charset="utf-8">
</head>
<body style="visibility: hidden;">
<div class="wrap">
    <div class="times">您有<i>3</i>次抽奖机会，快来试试手气</div>
    <div class="sratchArea">
        <div class="base" id="base">恭喜你中了三等奖</div>
        <img id="redux" src="/old/images/scratch/gray-cover.png"/>
    </div>
    <a class="my-prizes">我的奖品</a>
    <div class="activityInfo">
        <div class="item gift">
            <h4>奖项设置:</h4>
            <p>苹果Macbook Pro (13.3英寸)</p>
            <p>Ipad mini(16G)</p>
            <p>激光虚拟投影键盘</p>
        </div>
        <div class="item time">
            <h4>活动时间:</h4>
            <p>2017.02.02 00:00:00 至<br/> 2017.09.12 00:00:00</p>
        </div>
        <div class="item tip">
            <h4>活动说明:</h4>
            <p>这是活动说明，这是活动说明</p>
        </div>
    </div>
</div>
<script type="text/javascript">
    (function (doc, win) {
        var docEl = doc.documentElement,
            resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
            recalc = function () {
                var clientWidth = docEl.clientWidth;
                if (!clientWidth) return;
                // 针对uc横竖屏rem html没有重绘的问题
                var style;
                if (style = document.getElementById("forhtml")) {
                    style.parentNode.removeChild(style);
                }
                style = document.createElement("style");
                style.id = "forhtml";
                document.head.appendChild(style);
                style.appendChild(document.createTextNode("html{font-size:" + 20 * (clientWidth / 320) + "px !important;}"));
            };
        recalc();
        document.body.style.visibility = 'visible';
        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
        var a = document.getElementsByTagName('a');
        for (var i = 0; i < a.length; i++) {
            a[i].addEventListener('touchstart', function () {
            }, false);
        }
    })(document, window);
</script>
<script type='text/javascript' src='/old/common/js/jquery-2.1.1.min.js'></script>
<script type='text/javascript' src='/old/common/js/jquery.eraser.js'></script>
<script type="text/javascript">var jQuery = $.noConflict();</script>
<script type="text/javascript" charset="utf-8" src="/old/common/js/zepto.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/old/common/js/zepto-adapter.js"></script>
<script src='/old/common/js/modal.js' type='text/javascript'></script>
<script src="/old/common/js/bombBox.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
        jQuery('#redux').eraser({
            progressFunction: function(p) {
                console.log(p);
                $('#progress').html(Math.round(p*100)+'%');
            }
        });
        var retrunData = {
            "code": 200,
            "message": "恭喜您中奖了",
            "data": {
                "is_winning": true,
                "prize": {
                    "sponsors": [
                        {
                            "logo": "http://cloud-activity-test.oss-cn-shanghai.aliyuncs.com/20171113/17/20171113173630862517.png",
                            "name": "华栖云",
                            "percent": 0
                        }
                    ],
                    "id": "daab80e8-af6a-4c09-b424-b3152d876889",
                    "draw_id": "8514c9eb-0941-4727-9bac-68fc056ea2f5",
                    "exchange_address": "成都",
                    "stock_limit": 900,
                    "max_amount": 0,
                    "alias_name": "11",
                    "voucher_type": null,
                    "type_code": "entity",
                    "winning_limit": 0,
                    "exchange_url": null,
                    "exchange_method": 0,
                    "name": "实物测试",
                    "winning_probability": 1,
                    "surplus": 897,
                    "type_name": "实物",
                    "image": "http://cloud-activity-test.oss-cn-shanghai.aliyuncs.com/20171113/17/20171113173629654108.jpg",
                    "expired_start": 1510545600,
                    "voucher_code": "",
                    "expired_end": 1512014400
                },
                "surplus_times": 50
            }
        }
        var confirm = new Modal({
            prize: retrunData.data.prize
        },'address');
        confirm.open();
        $.alert('请登录后再参加活动!');
        jQuery('#redux').eraser('reset');
    });
</script>
</body>
</html>